package com.web.transaction.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.web.transaction.entity.Transaction;
import com.web.transaction.mapper.TransactionMapper;

@Service
public class TransactionService {

	@Autowired
    private TransactionMapper mapper;

	public void addTransaction(Transaction t) {
		mapper.addTransaction(t);
	}

	public List<Transaction> getTransactions(Transaction t){
		return mapper.getTransactions(t);
	}

	public List<Map<String,String>> getEcharts(){
		return mapper.getEchartsData();
	}
}
